xsh.Screen.Synchronous = True

Sub Main
    ' send crlf ???
    xsh.Screen.Send VbCr
    ' wait for string "#"yy
    xsh.Screen.WaitForString "#"
    ' send command "ls" + crlf ???
    xsh.Screen.Send "ls" & VbCr
    ' wait for string "#"yy
    xsh.Screen.WaitForString "#"
    ' sleep 1000ms
    xsh.Sleep 1000
    ' after 1000ms send command "ls" + crlf ???
    xsh.Screen.Send "ls" & VbCr
    ' wait for string "#"yy
    xsh.Screen.WaitForString "#"
End Sub


